<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
	<!-- content starts -->
	<blockquote class="layui-elem-quote"><{$action}></blockquote>

	<fieldset class="layui-elem-field">
  		<legend>按条件搜索</legend>
  		<div class="layui-field-box">
			<form class="layui-form layui-form-pane1" method="post" action="<{$current_url}>">
				<div class="layui-form-item">
			    	<div class="layui-inline">
			    		<input type="text" name="name" placeholder="科目名" value="<{if $name}><{$name}><{/if}>" class="layui-input">
			    	</div>
			    	<div class="layui-inline">
			    		<button type="submit" class="layui-btn">搜索</button>
			    		<a class="layui-btn" href="/tk_accounts_subject/add"><i class="layui-icon"></i> 添加分录题科目</a>
			    	</div>
		    	</div>

				
			</form>
  		</div>
	</fieldset>
	<div class="mtc_tab">
		<!--star mt-->
		<div class="layui-tab">
		  <ul class="layui-tab-title">
		  	<{foreach from=$top_subject item=item}>
		    	<li class=" <{if $item['id']==$pid}>layui-this<{/if}>"><a href="/tk_accounts_subject/index/<{$item['id']}>" ><{$item['title']}></a></li>
	    	<{/foreach}>
		    
		  </ul>
		 
		</div>

		<div class="mt" style="display: none;">
			<!-- <span class="l fs16">状态：</span> -->
			<{foreach from=$top_subject item=item}>
			<a href="/tk_accounts_subject/index/<{$item['id']}>" class="curr"><{$item['title']}></a>
			<{/foreach}>
		</div>
	<form class="layui-form layui-form-pane1" method="post" delete_action="/tk_category/delete">
		<table class="layui-table" lay-even lay-skin="row">
		  	<thead>
			  	<tr>
				  	<th>ID</th>
				  	<th>科目名称</th>
				  	<th>上级分类</th>
				  	<th>排序</th>
				  	<th>是否启用</th>
				  	<th>创建时间</th>
				  	<th>操作</th>
			  	</tr>
		  	</thead>   
		  	<tbody>
		  	<{foreach from=$subject item=item}>
			  	<tr>
			  		<td class="center">
						<input type="checkbox" name="ids[]" value="<{$item['id']}>" title="<{$item['id']}>">
			  		</td>
			  		<td class="center"><{$item['title']}></td>
			  		<td class="center"></td>
			  		<td class="center"><{$item['sort']}></td>
			  		<td class="center"><{if $item['status'] == 1}>是<{else}>否<{/if}></td>
			  		<td class="center"><{$item['add_time']|date_format:'%Y-%m-%d %H:%M:%S'}></td>
			  		<td class="center">
						<a class="layui-btn layui-btn-primary layui-btn-small" href="/tk_accounts_subject/edit/<{$item['id']}>" target="_blank"><i class="layui-icon"></i></a>
						<a class="layui-btn layui-btn-primary layui-btn-small delete_data" onclick="return confirm('确定删除该科目吗')" href="/tk_accounts_subject/delete/<{$item['id']}>"><i class="layui-icon"></i></a>
					</td>
			  	</tr>
		  	<{/foreach}>
		  	<{if $subject|count eq 0}>
		  		<tr>
			  		<td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="8">
						赞无数据！
					</td>
			  	</tr>
		  	<{/if}>
		  <!-- 	<tr>
				<td class="center" colspan="7">
					<input type="checkbox" lay-filter="checkbox_all" title="全选">
					<button id="delete" class="layui-btn layui-btn-primary layui-btn-small" style="margin-top:4px;"><i class="layui-icon"></i> 批量删除</button>
				</td>
			</tr> -->
	  		</tbody>
	  	</table>
  	</form>
  	</div>
  	<div class="layui-box layui-laypage layui-laypage-default">
		<{$pagination}>
	</div>      
<{include file="public_html/footer.html"}>